Skip to content

Stabilize path_file_prefix feature #144870

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2025
Merged

Conversation

Kivooeo
Copy link
Member

@Kivooeo Kivooeo commented Aug 3, 2025

This stabilises Path::file_prefix, following the FCP in tracking issue

(FCP ended almost a year ago, so if it's needed for proccess we could rerun it)

Closes: #86319

@rustbot
Copy link
Collaborator

rustbot commented Aug 3, 2025

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 3, 2025
@rust-log-analyzer

This comment has been minimized.

@Kivooeo Kivooeo force-pushed the file_prefix-stabilize branch from 8235756 to 0fc453f Compare August 3, 2025 20:32
@rustbot rustbot added the T-clippy Relevant to the Clippy team. label Aug 3, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 3, 2025

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rust-log-analyzer

This comment has been minimized.

@Kivooeo Kivooeo force-pushed the file_prefix-stabilize branch from 0fc453f to 4c4b8b2 Compare August 3, 2025 21:18
@jieyouxu
Copy link
Member

jieyouxu commented Aug 4, 2025

FWIW there seems to be an outstanding concern #86319 (comment)

@Kivooeo
Copy link
Member Author

Kivooeo commented Aug 4, 2025

I saw that but it seems like it's about adding another function, right? Or they want to make this new function a part of this stabilizaton?

@jieyouxu
Copy link
Member

jieyouxu commented Aug 4, 2025

cc @the8472 (I don't know)

@the8472
Copy link
Member

the8472 commented Aug 4, 2025

I was suggesting to make this part of this function. Alas, nobody responded to that suggestion.
It's rather late in the process and current API was already approved so you're not required to make that change, but I'll nominate it for discussion so the team can take another look at it.

@Kivooeo
Copy link
Member Author

Kivooeo commented Aug 4, 2025

We can open FCP to add this as an additional function to this and make it part of this feature in this PR, because I also think that this is better to return both parts

This wasn't fully discussed at the time, so I think it's worth addressing now, and I believe it's better late than never

@tgross35
Copy link
Contributor

tgross35 commented Aug 5, 2025

@rustbot label +I-libs-api-nominated

As noted, FCP completed at #86319 (comment) but there was a concern raised (not via rfcbot) #86319 (comment). Does this change anything for the FCP result?

(The iterator idea suggested at #86319 (comment) has a ton of +1s, and I believe would resolve the concern).

@rustbot rustbot added the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Aug 5, 2025
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Aug 6, 2025
…iplett

add code example showing that file_prefix treats dotfiles as the name of a file, not an extension

This came up in a libs-api meeting while we were reviewing rust-lang#144870
rust-timer added a commit that referenced this pull request Aug 7, 2025
Rollup merge of #144972 - the8472:file-prefix-docs, r=joshtriplett

add code example showing that file_prefix treats dotfiles as the name of a file, not an extension

This came up in a libs-api meeting while we were reviewing #144870
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Aug 12, 2025
…iplett

add code example showing that file_prefix treats dotfiles as the name of a file, not an extension

This came up in a libs-api meeting while we were reviewing rust-lang#144870
@the8472
Copy link
Member

the8472 commented Aug 12, 2025

After some discussion with the libs team I'm withdrawing my concern since people consider this feature useful on its own even if an iteration version existed.

@tgross35
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 12, 2025

📌 Commit 4c4b8b2 has been approved by tgross35

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 12, 2025
bors added a commit that referenced this pull request Aug 13, 2025
Rollup of 11 pull requests

Successful merges:

 - #143467 (Add ASCII-related methods from `u8` and `MIN`/`MAX` to `core::ascii::Char`)
 - #144519 (Constify `SystemTime` methods)
 - #144642 (editorconfig: don't trim trailing whitespace in tests)
 - #144870 (Stabilize `path_file_prefix` feature)
 - #145269 (Deprecate RUST_TEST_* env variables)
 - #145274 (Remove unused `#[must_use]`)
 - #145289 (chore(ci): upgrade checkout to v5)
 - #145303 (Docs: Link to payload_as_str() from payload().)
 - #145308 (Adjust documentation of `dangling`)
 - #145320 (Allow cross-compiling the Cranelift dist component)
 - #145325 (Add `cast_init` and `cast_uninit` methods for pointers)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ff44871 into rust-lang:master Aug 13, 2025
10 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 13, 2025
rust-timer added a commit that referenced this pull request Aug 13, 2025
Rollup merge of #144870 - Kivooeo:file_prefix-stabilize, r=tgross35

Stabilize `path_file_prefix` feature

This stabilises `Path::file_prefix`, following the FCP in [tracking issue ](#86319)

(FCP ended almost a year ago, so if it's needed for proccess we could rerun it)

Closes: #86319
@mbhall88
Copy link

Thank you all. So should I go ahead and make a tracking issue for the iterator method that gives you all parts of the Path?

@tgross35
Copy link
Contributor

I don't think it is accepted yet, so it needs to be proposed first. If you have an API in mind, open an ACP issue template at https://github.com/rust-lang/libs-team/issues to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-libs-api-nominated Nominated for discussion during a libs-api team meeting. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking Issue for Path::file_prefix
8 participants